<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
description("Tests whether polygons render up to first parsing error.");

var svgDoc = document.implementation.createDocument("http://www.w3.org/2000/svg", "svg", null);
var svg = svgDoc.rootElement;

var poly1 = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
poly1.setAttribute("points", "80,200 80,300 150,250 80,200 250");
svg.appendChild(poly1);

shouldBe("poly1.points.numberOfItems", "4");

var poly2 = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
poly2.setAttribute("points", "80,200 80,300 150,250 80,200");
svg.appendChild(poly2);

shouldBe("poly2.points.numberOfItems", "4");

var poly3 = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
poly3.setAttribute("points", "180,200 180,300 250,250 180,200");
svg.appendChild(poly3);

shouldBe("poly3.points.numberOfItems", "4");

var poly4 = document.createElementNS("http://www.w3.org/2000/svg", "polyline");
poly4.setAttribute("points", "180,200 180,300 250,250 180,200 250");
svg.appendChild(poly4);

shouldBe("poly4.points.numberOfItems", "4");

var poly5 = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
poly5.setAttribute("points", "80,60 80,160 150,110 80");
svg.appendChild(poly5);

shouldBe("poly5.points.numberOfItems", "3");

var poly6 = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
poly6.setAttribute("points", "80,60 80,160 150,110");
svg.appendChild(poly6);

shouldBe("poly6.points.numberOfItems", "3");

var poly7 = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
poly7.setAttribute("points", "180,60 180,160 250,110");
svg.appendChild(poly7);

shouldBe("poly7.points.numberOfItems", "3");

var poly8 = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
poly8.setAttribute("points", "180,60 180,160 250,110 180");
svg.appendChild(poly8);

shouldBe("poly8.points.numberOfItems", "3");

var successfullyParsed = true;
</script>
</body>
</html>
